package com.comm;

import android.app.Activity;
import android.content.Intent;

import com.comm.update.UpdateInfo;
import com.comm.update.UpdateService;

/**
 * 处理页面跳转
 * Created by chenxunlin01 on 2017/10/10.
 */

public class ActivityDisplay {

    private Activity activity;

    public ActivityDisplay(Activity activity) {
        this.activity = activity;
    }

    /**
     * 启动应用更新
     */
    public void startAppUpdateService(UpdateInfo updateInfo) {
        Intent intent = new Intent(activity, UpdateService.class);
        intent.setPackage("com.comm");
        intent.putExtra("updateinfo", updateInfo);
        activity.startService(intent);
    }
}
